#include <iostream>
#include "IOGen.h";
#include "MinHeap.h"
using namespace std;

int main()
{
	
	Heap * heap = new MinHeap();
	for (int i = 0; i < 10; i++)
		heap->insert(i);
	for (int i = 0; i < 10; i++)
		heap->insert(i);
	for (int i = 20; i > 10; i--)
		heap->insert(i);
	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 20; i > 10; i--)
		heap->insert(i);

	for (int i = 200; i > 100; i--)
		heap->insert(i);
	for (int i = 200; i > 100; i--)
		heap->insert(i);
	for (int i = 200; i > 100; i--)
		heap->insert(i);
	for (int i = 200; i > 100; i--)
		heap->insert(i);
	for (int i = 0; i < 10; i++)
		heap->insert(i);
	for (int i = 0; i < 10; i++)
		heap->insert(i);
	int data = -1;
	while (!heap->isEmpty())
	{
		int d = data;
		data = heap->pop();
		if (d > data)
			cout << "\n\n\n\nERROR!!!!\n\n\n\n";
	//	cout << data << " ";
	}
	delete heap;
	return 0;
}
